package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.UserStatisticsInfo;
import com.micro.modual.model.bo.userstatisticsinfo.UserStatisticsInfoBO;

/**
 * <h1>用户统计记录表(管理员进行查看) 延展类</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class UserStatisticsInfoExtension {

    /**
     * <h2>转换: 用户统计记录表(管理员进行查看) 新增</h2>
     * @param userStatisticsInfoBO {@link UserStatisticsInfoBO} 用户统计记录表(管理员进行查看) 新增/修改 请求对象
     * @return {@link UserStatisticsInfo} 用户统计记录表(管理员进行查看)
     */
    public static UserStatisticsInfo converAddUserStatisticsInfo(UserStatisticsInfoBO userStatisticsInfoBO) {
        UserStatisticsInfo userStatisticsInfo = new UserStatisticsInfo();
        userStatisticsInfo.setId(SnowFlakeUtil.getId());
                                                            userStatisticsInfo.setUserCode(userStatisticsInfoBO.getUserCode());
                                                    userStatisticsInfo.setConsumePrice(userStatisticsInfoBO.getConsumePrice());
                                                    userStatisticsInfo.setTotalOrderCount(userStatisticsInfoBO.getTotalOrderCount());
                                                    userStatisticsInfo.setCouponCount(userStatisticsInfoBO.getCouponCount());
                                                    userStatisticsInfo.setCommentCount(userStatisticsInfoBO.getCommentCount());
                                                    userStatisticsInfo.setLoginCount(userStatisticsInfoBO.getLoginCount());
                                                    userStatisticsInfo.setCollectProductCount(userStatisticsInfoBO.getCollectProductCount());
                                                    userStatisticsInfo.setRecentOrderTime(userStatisticsInfoBO.getRecentOrderTime());
                                                    userStatisticsInfo.setCreateTime(userStatisticsInfoBO.getCreateTime());
                                                    userStatisticsInfo.setUpdateTime(userStatisticsInfoBO.getUpdateTime());
                                                    userStatisticsInfo.setSeckillOrderCount(userStatisticsInfoBO.getSeckillOrderCount());
                                                    userStatisticsInfo.setExchangeOrderCount(userStatisticsInfoBO.getExchangeOrderCount());
                                                    userStatisticsInfo.setRechargeOrderCount(userStatisticsInfoBO.getRechargeOrderCount());
                                                    userStatisticsInfo.setAssembleOrderCount(userStatisticsInfoBO.getAssembleOrderCount());
                                                    userStatisticsInfo.setNormalOrderCount(userStatisticsInfoBO.getNormalOrderCount());
                            return userStatisticsInfo;
    }

    /**
     * <h2>转换: 用户统计记录表(管理员进行查看) 修改</h2>
     * @param userStatisticsInfoBO {@link UserStatisticsInfoBO} 用户统计记录表(管理员进行查看) 新增/修改 请求对象
     * @return {@link UserStatisticsInfo} 用户统计记录表(管理员进行查看)
     */
    public static UserStatisticsInfo converEditUserStatisticsInfo(UserStatisticsInfoBO userStatisticsInfoBO) {
        UserStatisticsInfo userStatisticsInfo = new UserStatisticsInfo();
        userStatisticsInfo.setId(userStatisticsInfoBO.getId());
                                                        userStatisticsInfo.setUserCode(userStatisticsInfoBO.getUserCode());
                                                userStatisticsInfo.setConsumePrice(userStatisticsInfoBO.getConsumePrice());
                                                userStatisticsInfo.setTotalOrderCount(userStatisticsInfoBO.getTotalOrderCount());
                                                userStatisticsInfo.setCouponCount(userStatisticsInfoBO.getCouponCount());
                                                userStatisticsInfo.setCommentCount(userStatisticsInfoBO.getCommentCount());
                                                userStatisticsInfo.setLoginCount(userStatisticsInfoBO.getLoginCount());
                                                userStatisticsInfo.setCollectProductCount(userStatisticsInfoBO.getCollectProductCount());
                                                userStatisticsInfo.setRecentOrderTime(userStatisticsInfoBO.getRecentOrderTime());
                                                userStatisticsInfo.setCreateTime(userStatisticsInfoBO.getCreateTime());
                                                userStatisticsInfo.setUpdateTime(userStatisticsInfoBO.getUpdateTime());
                                                userStatisticsInfo.setSeckillOrderCount(userStatisticsInfoBO.getSeckillOrderCount());
                                                userStatisticsInfo.setExchangeOrderCount(userStatisticsInfoBO.getExchangeOrderCount());
                                                userStatisticsInfo.setRechargeOrderCount(userStatisticsInfoBO.getRechargeOrderCount());
                                                userStatisticsInfo.setAssembleOrderCount(userStatisticsInfoBO.getAssembleOrderCount());
                                                userStatisticsInfo.setNormalOrderCount(userStatisticsInfoBO.getNormalOrderCount());
                            return userStatisticsInfo;
    }
}
